import request from '@/utils/request'

// 查询地产列表
export function listRealEstate(query) {
  return request({
    url: '/realEstate/realEstate/list',
    method: 'get',
    params: query
  })
}

// 查询地产详细
export function getRealEstate(id) {
  return request({
    url: '/realEstate/realEstate/' + id,
    method: 'get'
  })
}

// 新增地产
export function addRealEstate(data) {
  return request({
    url: '/realEstate/realEstate',
    method: 'post',
    data: data
  })
}

// 修改地产
export function updateRealEstate(data) {
  return request({
    url: '/realEstate/realEstate',
    method: 'put',
    data: data
  })
}

// 删除地产
export function delRealEstate(id) {
  return request({
    url: '/realEstate/realEstate/' + id,
    method: 'delete'
  })
}
